package com.ny.nybase.widget.ptr;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ListView;

/**
 * Created by LiangYu on 2018/1/8.
 */
public abstract class AbstractPullToRefreshListView extends ListView {

    public AbstractPullToRefreshListView(Context context) {
        super(context);
    }

    public AbstractPullToRefreshListView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public AbstractPullToRefreshListView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    // ------ 对外接口部分 ------

    abstract public PullToRefreshWidget getHeader();

    abstract public PullToRefreshWidget getFooter();

    abstract public void setHeaderRefreshEnabled(boolean enabled);

    abstract public void setFooterRefreshEnabled(boolean enabled);

    abstract public boolean getHeaderRefreshEnabled();

    abstract public boolean getFooterRefreshEnabled();

    abstract public void startHeaderRefresh();

    abstract public void startFooterRefresh();

    abstract public void stopHeaderRefresh();

    abstract public void stopHeaderRefresh(boolean anim);

    abstract public void stopFooterRefresh();

    // ------ GestureHandler 接口部分 ------

    abstract int getFooterHeight();

    abstract void dispatchHeaderRefresh();

    abstract void dispatchFooterRefresh();

    abstract void setHeaderState(PullToRefreshWidgetState state);

    abstract void setFooterState(PullToRefreshWidgetState state);
}
